package com.example.demo.unit;

import com.example.common.utils.DateUtils;

import java.util.Date;

/**
 * @author luowenjie
 * @since 2021/9/27 18:38
 */
public class Date2Test {

    public static void main(String[] args) {
        String now = DateUtils.now_yyyy_MM_dd();
        Date date = DateUtils.strToDate(now+" 19:39:05",DateUtils.yyyy_MM_dd_HH_mm_ss);
        if(date.getTime()>new Date().getTime()){
            System.out.println("当天");
            System.out.println(DateUtils.dateToStr_yyyy_MM_dd_HH_mm_ss(date));
        }else{
            date = DateUtils.dateAddDay(date,1);
            System.out.println("第二天");
            System.out.println(DateUtils.dateToStr_yyyy_MM_dd_HH_mm_ss(date));
        }

        Date date2 = DateUtils.dateAddMinute(new Date(),60);
        System.out.println(DateUtils.dateToStr_yyyy_MM_dd_HH_mm_ss(date2));
    }

}
